<%@page import="DAL.*" errorPage="_Error.jsp"%>
<%@page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="../Style/EditStyle.css"/>
<script type="text/javascript" src="/SPORT/Script/jquery-1.10.1.js"></script>
<script type="text/javascript">
	$(function()
	{		
		//取消按钮点击事件
		$("#btnCancel").click(function()
		{
			location.href="/SPORT/JudgeHandle?type=4";//点击后跳转至JudgeHandle Servlet页面
		});
	});
</script>

</head>
<body>
	<%
		response.setCharacterEncoding("UTF-8");//设置输出编码格式
		String JId=request.getParameter("JId").toString();//获取url传过来的JId
	        DAL.Judge judge=new DAL.Judge();//实例化Judge对象
	        List<Object> judgeList=judge.getEntityById(JId);//根据ID获取Judge数据
	        Object[] obj=(Object[])judgeList.get(0);//将List数据转换成Object[]
	        
	 %>
	 <form action="/SPORT/JudgeHandle?type=2" method="post">
		<table style=" margin:50px auto;">
	            <tbody>
			 <tr><td>裁判编号：</td><td><input type="text" name="JId" value="<%=obj[0] %>" /></td></tr>
			 <tr><td>裁判姓名：</td><td><input type="text" name="JName" value="<%=obj[1] %>" /></td></tr>
			 <tr><td>裁判性别：</td><td>
			 	<select name="JSex" >
			 	<%
			 		if(obj[2].toString().equals("男")){
			 			out.write("<option value='男' selected='selected'>男</option>");
			 			out.write("<option value='女'>女</option>");
			 		}
			 		else{
			 			out.write("<option value='男'>男</option>");
			 			out.write("<option value='女' selected='selected'>女</option>");
			 		}
			 	 %>
			 	 </select>
			 </td></tr>
		    </tbody>   
	            
	            <tfoot>
	                <tr><td><input type="submit" value="确定" id="btnSure"/></td><td><input type="button" value="取消" id="btnCancel"/></td></tr>
	            </tfoot> 
	        </table>
     </form>
</body>
</html>
